#ifndef _EquipDetailDialog_h__
#define _EquipDetailDialog_h__

#include "Global.h"




#include "../item/Item.h"
#include "../EquipIcon.h"

class EquipDetailDialog
	: public ModelDialog
	, public CCBMemberVariableAssigner
	, public CCBSelectorResolver
	, public CCNodeLoaderListener
{
public:
	CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(EquipDetailDialog, create);

	EquipDetailDialog(void);
	~EquipDetailDialog(void);

	virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual bool onAssignCCBMemberVariable(CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode);
	virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader);
	bool init();
	void refresh();
	void onEnter();
	void onExit();
private:
	CCLabelTTF* mName;
	CCLabelTTF* mLevel;
	CCLabelTTF* mType;
	CCLabelTTF* mProperty;
	CCLabelTTF* mPropertyTitle;
    CCControlButton* mEquipBtn;
    CCControlButton* mTakeOffBtn;
    CCControlButton* mUpgradeBtn;
	CCControlButton* mMeltBtn;
	Item* mItemIcon;
	EquipIcon* mEquipIcon;
	//CCNode* mEquipIcon;

	void onEquipBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
	void onTakeOffBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
	void onUpgradeBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
	void onMeltBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
	void _onNotification(CCObject* pSender);
	void touchScreen();
};

#endif